﻿@{
    ViewBag.Title = "入库报表";
}
<h2 class="text-center">入库报表</h2>
<div id="hot"></div>

@section scripts{
    <script type="text/javascript">
        var dataObject =@Html.Raw(ViewBag.DataObject);
        var hotElement = document.querySelector('#hot');
        var hotElementContainer = hotElement.parentNode;
        var hotSettings = {
            data: dataObject,
            columns: [
                {
                    data: 'Id',
                    type: 'numeric',
                    width: 40,
                },
                {
                    data: 'MaterialName',
                    type: 'text',
                },
                {
                    data: 'T_InDate',
                    type: 'text',
                },
                {
                    data: 'TakeWay',
                    type: 'text',
                },
                {
                    data: 'DepotSite',
                    type: 'text',
                },
                {
                    data: 'Count',
                    type: 'text',
                },
                {
                    data: 'Weight',
                    type: 'text',
                },
                {
                    data: 'Supplier',
                    type: 'text',
                },
                {
                    data: 'Contact',
                    type: 'text',
                },
            ],
            stretchH: 'all',
            autoWrapRow: true,
            maxRows: 22,
            manualRowResize: true,
            manualColumnResize: true,
            rowHeaders: true,
            colHeaders: [
                'ID',
                '材料名称',
                '入库日期',
                '交接方式',
                '仓库区位',
                '入库数量',
                '重量',
                '供应商',
                '联系人',
            ],
            manualRowMove: true,
            manualColumnMove: true,
            contextMenu: true,
            filters: true,
            dropdownMenu: true,
            readOnly:true,
        };
        var hot = new Handsontable(hotElement, hotSettings);
    </script>
}